package model

import (
	"time"

	"github.com/flipped-aurora/gin-vue-admin/server/global"
	"gorm.io/datatypes"
)

// IntelligentFormSubmission 表单提交记录结构体
type IntelligentFormSubmission struct {
	global.GVA_MODEL
	FormID     uint           `json:"formId" form:"formId" gorm:"column:form_id;comment:表单ID;not null;"`
	SubmitUser *uint          `json:"submitUser" form:"submitUser" gorm:"column:submit_user;comment:提交用户ID;"`
	SubmitIP   string         `json:"submitIp" form:"submitIp" gorm:"column:submit_ip;comment:提交IP;size:45;"`
	SubmitData datatypes.JSON `json:"submitData" form:"submitData" gorm:"column:submit_data;comment:提交数据;not null;" swaggertype:"object"`
	SubmitTime time.Time      `json:"submitTime" form:"submitTime" gorm:"column:submit_time;comment:提交时间;not null;"`
}

// TableName 表单提交记录 IntelligentFormSubmission自定义表名 gva_intelligent_form_submissions
func (IntelligentFormSubmission) TableName() string {
	return "gva_intelligent_form_submissions"
}
